{% extends 'shop/base.html' %}

{% block title %}发起新的对话{% endblock %}

{% block content %}
<h1 class="mb-6 text-3xl">发起新的对话</h1>
<div class="grid grid-cols-5 gap-6">
    <div class="col-span-3 space-y-6">
        <form method="post" action=".">
            {% csrf_token %}

            <div class="space-y-4">
                {{ form.as_p }}
            </div>

            {% if form.errors or form.non_field_errors %}
                <div class="mb-3 p-6 bg-red-100 rounded-xl">
                    {% for field in form %}
                        {{ field.errors }}
                    {% endfor %}

                    {{ form.non_field_errors }}
                </div>
            {% endif %}

            <button class="mt-6 py-4 px-8 text-lg bg-teal-500 hover:bg-teal-700 rounded-xl text-white">发送</button>
        </form>
    </div>
    {% include 'conversation/include/item_div.html' with item=item %}
</div>
{% endblock %}